package com.hd.crdao.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.hd.crdao.R;
import com.hd.crdao.base.MyBaseAdapter;
import com.hd.crdao.bean.BrandInfoBean;
import com.hd.crdao.utils.UIUtils;

import java.util.List;

/**
 *
 *@author Administrator
 *@date 2017/5/31 0031
 */
public class SeriesAdapater extends MyBaseAdapter<BrandInfoBean.RowsBean> {

    public SeriesAdapater(List<BrandInfoBean.RowsBean> dataSets) {
        super(dataSets);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        SeriesAdapater.ViewHolder viewHolder;
        BrandInfoBean.RowsBean rowsBean = mDataSets.get(position);
        if (convertView == null) {
            viewHolder = new SeriesAdapater.ViewHolder();
            convertView = View.inflate(UIUtils.getContext(), R.layout.item_city, null);
            viewHolder.area = (TextView) convertView.findViewById(R.id.area);
            convertView.setTag(viewHolder);
        } else {
            viewHolder = (SeriesAdapater.ViewHolder) convertView.getTag();
        }
        viewHolder.area.setText(rowsBean.getVcSeries());
        return convertView;
    }

    final static class ViewHolder {
        TextView area;
    }

}
